import axios from '../../../controllers/request'
/**
 * 快速生成上线日志
 */

export const topLineCalendar = async (assistant_id = null): Promise<any> => {
  return await axios.get('/api/v1/assistant/operate/diff/' + `${assistant_id}`)
}

/**
 * 上线
 */
export const topLinePublish = async (data, assistant_id) => {
  return await axios.post(`/api/v1/assistant/operate/publish/${assistant_id}`, data)
}

/**
 * 下线
 */
export const topLineOffline = async assistant_id => {
  return await axios.post(`/api/v1/assistant/operate/offline/${assistant_id}`, {})
}

/* 最后上线提交记录 */
export const topLineLastPublish = async (assistant_id = null): Promise<any> => {
  return await axios.get('/api/v1/assistant/operate/last_publish?assistant_id=' + `${assistant_id}`)
}
